﻿@inherits ComponentBase

<AuthorizeView Context="auth">
    <Authorized>
        @if (auth.User.UserAdmin())
        {
            <Card IsShadow="true" HeaderText="系统警告">
                <BodyTemplate>
                    <Empty Image="_content/GMS.NET.Web.Components/svgs/privacy.svg"
                           Text="为了保障客户的隐私安全,请使用客户账号查看数据" />
                </BodyTemplate>
            </Card>
        }
        else
        {
            @ChildContent
        }
    </Authorized>
    <NotAuthorized>
        <NotAuthorized />
    </NotAuthorized>
</AuthorizeView>

@code{
    [Parameter]
    public RenderFragment? ChildContent { get; set; }
}
